package top.wettis.chat.pojo.Query;

import cn.hutool.core.annotation.Alias;
import lombok.Data;

import javax.validation.constraints.NotEmpty;
import javax.validation.constraints.Pattern;

@Data
public class UserAccount {

    @Alias("username")
    @NotEmpty(message = "用户名为空")
//    @Pattern(regexp = "[^a-zA-Z0-9]{6,30}$",message = "用户名只能包含 a-z,A-Z,0-9 , 长度在6-30位之间")
    private String name;
    @NotEmpty(message = "密码未填写")
//    @Pattern(regexp = "^(?=.*[a-z])(?=.*[A-Z])[a-zA-Z0-9~!@&%#_]{8,16}$",message = "至少8-16个字符，至少1个大写字母，1个小写字母和1个数字，其他可以是任意字符")
    private String password;
}
